using UnityEngine;

namespace Crosstales.Common.Util
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.Common.Util.RandomColor
    public class RandomColor : MonoBehaviour
    {
        // Fields
        public bool UseInterval;
        public UnityEngine.Vector2 ChangeInterval;
        public UnityEngine.Vector2 HueRange;
        public UnityEngine.Vector2 SaturationRange;
        public UnityEngine.Vector2 ValueRange;
        public UnityEngine.Vector2 AlphaRange;
        public bool GrayScale;
        public UnityEngine.Material Material;
        public bool RandomColorAtStart;
        private float elapsedTime;
        private float changeTime;
        private UnityEngine.Renderer currentRenderer;
        private UnityEngine.Color32 startColor;
        private UnityEngine.Color32 endColor;
        private float lerpProgress;
        private static readonly int colorID;
        private bool existsMaterial;
        
        // Methods
        private void Start()
        {
            var val_7;
            float val_52;
            long val_54;
            float val_55;
            var val_56;
            UnityEngine.Material val_57;
            long val_58;
            float val_59;
            var val_60;
            long val_62;
            float val_63;
            var val_64;
            long val_66;
            float val_67;
            var val_68;
            var val_70;
            float val_71;
            long val_72;
            float val_73;
            var val_74;
            long val_76;
            float val_77;
            var val_78;
            long val_80;
            float val_81;
            var val_82;
            long val_84;
            float val_85;
            var val_86;
            long val_87;
            float val_88;
            var val_89;
            long val_91;
            float val_92;
            var val_93;
            UnityEngine.Color32 val_95;
            this.existsMaterial = UnityEngine.Object.op_Inequality(x:  this.Material, y:  0);
            float val_3 = UnityEngine.Random.Range(minInclusive:  this.ChangeInterval, maxInclusive:  null);
            this.elapsedTime = val_3;
            this.changeTime = val_3;
            if(this.RandomColorAtStart == false)
            {
                goto label_2;
            }
            
            if(this.GrayScale == false)
            {
                goto label_3;
            }
            
            float val_5 = UnityEngine.Random.Range(minInclusive:  this.AlphaRange, maxInclusive:  null);
            val_52 = val_5;
            val_5 = val_5 * 255f;
            float val_6 = ((UnityEngine.Random.Range(minInclusive:  this.HueRange, maxInclusive:  null)) >= 0) ? (val_5) : 0f;
            if(val_6 >= 0f)
            {
                goto label_4;
            }
            
            if((double)val_6 != (-0.5))
            {
                goto label_5;
            }
            
            val_54 = (long)val_7;
            val_55 = (float)val_7;
            val_56 = val_55 + (-1f);
            goto label_6;
            label_2:
            if(this.existsMaterial == false)
            {
                goto label_7;
            }
            
            val_57 = this.Material;
            UnityEngine.Color val_8 = val_57.GetColor(nameID:  mem[536891369]);
            goto label_10;
            label_3:
            UnityEngine.Color val_9 = UnityEngine.Random.ColorHSV(hueMin:  this.HueRange, hueMax:  null, saturationMin:  this.SaturationRange, saturationMax:  null, valueMin:  this.ValueRange, valueMax:  null, alphaMin:  this.AlphaRange, alphaMax:  null);
            float val_41 = 255f;
            val_41 = val_9.g * val_41;
            float val_10 = (val_9.r >= 0) ? (val_41) : 0f;
            val_52 = val_9.a;
            if(val_10 >= 0f)
            {
                goto label_11;
            }
            
            if((double)val_10 != (-0.5))
            {
                goto label_12;
            }
            
            val_58 = (long)val_7;
            val_59 = (float)val_7;
            val_60 = val_59 + (-1f);
            goto label_13;
            label_4:
            if((double)val_6 != 0.5)
            {
                goto label_14;
            }
            
            val_54 = (long)val_7;
            val_55 = (float)val_7;
            val_56 = val_55 + 1f;
            label_6:
            var val_11 = ((val_54 & 1) != 0) ? (val_55) : (val_56);
            goto label_25;
            label_7:
            val_57 = this;
            this.currentRenderer = this.GetComponent<System.Object>();
            UnityEngine.Color val_14 = this.currentRenderer.material.color;
            label_10:
            float val_42 = 255f;
            val_42 = val_14.g * val_42;
            float val_15 = (val_14.r >= 0) ? (val_42) : 0f;
            if(val_15 >= 0f)
            {
                goto label_18;
            }
            
            if((double)val_15 != (-0.5))
            {
                goto label_19;
            }
            
            val_62 = (long)val_7;
            val_63 = (float)val_7;
            val_64 = val_63 + (-1f);
            goto label_20;
            label_18:
            if((double)val_15 != 0.5)
            {
                goto label_21;
            }
            
            val_62 = (long)val_7;
            val_63 = (float)val_7;
            val_64 = val_63 + 1f;
            label_20:
            var val_16 = ((val_62 & 1) != 0) ? (val_63) : (val_64);
            goto label_37;
            label_11:
            if((double)val_10 != 0.5)
            {
                goto label_23;
            }
            
            val_58 = (long)val_7;
            val_59 = (float)val_7;
            val_60 = val_59 + 1f;
            label_13:
            var val_17 = ((val_58 & 1) != 0) ? (val_59) : (val_60);
            goto label_56;
            label_5:
            float val_43 = -0.5f;
            val_43 = val_6 + val_43;
            goto label_25;
            label_14:
            float val_44 = 0.5f;
            val_44 = val_6 + val_44;
            label_25:
            if(val_6 >= 0f)
            {
                goto label_26;
            }
            
            if((double)val_6 != (-0.5))
            {
                goto label_27;
            }
            
            val_66 = (long)val_7;
            val_67 = (float)val_7;
            val_68 = val_67 + (-1f);
            goto label_28;
            label_26:
            if((double)val_6 != 0.5)
            {
                goto label_29;
            }
            
            val_66 = (long)val_7;
            val_67 = (float)val_7;
            val_68 = val_67 + 1f;
            label_28:
            var val_18 = ((val_66 & 1) != 0) ? (val_67) : (val_68);
            goto label_31;
            label_27:
            float val_45 = -0.5f;
            val_45 = val_6 + val_45;
            goto label_31;
            label_29:
            float val_46 = 0.5f;
            val_46 = val_6 + val_46;
            label_31:
            if(val_6 >= 0f)
            {
                goto label_32;
            }
            
            if((double)val_6 == (-0.5))
            {
                goto label_33;
            }
            
            val_70 = val_6 + (-0.5f);
            goto label_68;
            label_32:
            if((double)val_6 == 0.5)
            {
                goto label_35;
            }
            
            val_71 = val_6 + 0.5f;
            goto label_36;
            label_19:
            float val_47 = -0.5f;
            val_47 = val_15 + val_47;
            goto label_37;
            label_21:
            float val_48 = 0.5f;
            val_48 = val_15 + val_48;
            label_37:
            val_48 = val_48 * 255f;
            float val_19 = (val_14.g >= 0) ? (val_48) : 0f;
            if(val_19 >= 0f)
            {
                goto label_38;
            }
            
            if((double)val_19 != (-0.5))
            {
                goto label_39;
            }
            
            val_72 = (long)val_7;
            val_73 = (float)val_7;
            val_74 = val_73 + (-1f);
            goto label_40;
            label_38:
            if((double)val_19 != 0.5)
            {
                goto label_41;
            }
            
            val_72 = (long)val_7;
            val_73 = (float)val_7;
            val_74 = val_73 + 1f;
            label_40:
            var val_20 = ((val_72 & 1) != 0) ? (val_73) : (val_74);
            goto label_43;
            label_39:
            float val_49 = -0.5f;
            val_49 = val_19 + val_49;
            goto label_43;
            label_41:
            float val_50 = 0.5f;
            val_50 = val_19 + val_50;
            label_43:
            val_50 = val_50 * 255f;
            float val_21 = (val_14.b >= 0) ? (val_50) : 0f;
            if(val_21 >= 0f)
            {
                goto label_44;
            }
            
            if((double)val_21 != (-0.5))
            {
                goto label_45;
            }
            
            val_76 = (long)val_7;
            val_77 = (float)val_7;
            val_78 = val_77 + (-1f);
            goto label_46;
            label_44:
            if((double)val_21 != 0.5)
            {
                goto label_47;
            }
            
            val_76 = (long)val_7;
            val_77 = (float)val_7;
            val_78 = val_77 + 1f;
            label_46:
            var val_22 = ((val_76 & 1) != 0) ? (val_77) : (val_78);
            goto label_49;
            label_45:
            float val_51 = -0.5f;
            val_51 = val_21 + val_51;
            goto label_49;
            label_47:
            float val_52 = 0.5f;
            val_52 = val_21 + val_52;
            label_49:
            val_52 = val_52 * 255f;
            float val_23 = (val_14.a >= 0) ? (val_52) : 0f;
            if(val_23 >= 0f)
            {
                goto label_50;
            }
            
            if((double)val_23 != (-0.5))
            {
                goto label_51;
            }
            
            val_80 = (long)val_7;
            val_81 = (float)val_7;
            val_82 = val_81 + (-1f);
            goto label_52;
            label_50:
            if((double)val_23 != 0.5)
            {
                goto label_53;
            }
            
            val_80 = (long)val_7;
            val_81 = (float)val_7;
            val_82 = val_81 + 1f;
            label_52:
            val_81 = ((val_80 & 1) != 0) ? (val_81) : (val_82);
            goto label_55;
            label_51:
            float val_53 = -0.5f;
            val_53 = val_23 + val_53;
            goto label_55;
            label_53:
            float val_54 = 0.5f;
            val_54 = val_23 + val_54;
            label_55:
            var val_25 = (val_19 < 0) ? ((int)val_19) : ((int)val_19);
            val_25 = val_25 & 255;
            var val_26 = (val_21 < 0) ? ((int)val_21) : ((int)val_21);
            val_26 = val_26 & 255;
            var val_27 = (val_54 < 0) ? ((int)val_54) : ((int)val_54);
            this.startColor = (S14 < 0) ? ((int)S14) : ((int)S14);
            return;
            label_12:
            float val_55 = -0.5f;
            val_55 = val_10 + val_55;
            goto label_56;
            label_23:
            float val_56 = 0.5f;
            val_56 = val_10 + val_56;
            label_56:
            val_56 = val_56 * 255f;
            float val_28 = (val_9.g >= 0) ? (val_56) : 0f;
            if(val_28 >= 0f)
            {
                goto label_57;
            }
            
            if((double)val_28 != (-0.5))
            {
                goto label_58;
            }
            
            val_84 = (long)val_7;
            val_85 = (float)val_7;
            val_86 = val_85 + (-1f);
            goto label_59;
            label_57:
            if((double)val_28 != 0.5)
            {
                goto label_60;
            }
            
            val_84 = (long)val_7;
            val_85 = (float)val_7;
            val_86 = val_85 + 1f;
            label_59:
            var val_29 = ((val_84 & 1) != 0) ? (val_85) : (val_86);
            goto label_62;
            label_58:
            float val_57 = -0.5f;
            val_57 = val_28 + val_57;
            goto label_62;
            label_60:
            float val_58 = 0.5f;
            val_58 = val_28 + val_58;
            label_62:
            val_58 = val_58 * 255f;
            float val_30 = (val_9.b >= 0) ? (val_58) : 0f;
            if(val_30 >= 0f)
            {
                goto label_63;
            }
            
            if((double)val_30 != (-0.5))
            {
                goto label_64;
            }
            
            label_33:
            val_87 = (long)val_7;
            val_88 = (float)val_7;
            val_89 = val_88 + (-1f);
            goto label_65;
            label_63:
            if((double)val_30 != 0.5)
            {
                goto label_66;
            }
            
            label_35:
            val_87 = (long)val_7;
            val_88 = (float)val_7;
            val_89 = val_88 + 1f;
            label_65:
            var val_31 = ((val_87 & 1) != 0) ? (val_88) : (val_89);
            goto label_68;
            label_64:
            val_70 = val_30 + (-0.5f);
            goto label_68;
            label_66:
            val_71 = val_30 + 0.5f;
            label_36:
            label_68:
            val_71 = val_71 * 255f;
            float val_32 = (val_52 >= 0) ? (val_71) : 0f;
            if(val_32 >= 0f)
            {
                goto label_69;
            }
            
            if((double)val_32 != (-0.5))
            {
                goto label_70;
            }
            
            val_91 = (long)val_7;
            val_92 = (float)val_7;
            val_93 = val_92 + (-1f);
            goto label_71;
            label_69:
            if((double)val_32 != 0.5)
            {
                goto label_72;
            }
            
            val_91 = (long)val_7;
            val_92 = (float)val_7;
            val_93 = val_92 + 1f;
            label_71:
            val_92 = ((val_91 & 1) != 0) ? (val_92) : (val_93);
            goto label_74;
            label_70:
            float val_59 = -0.5f;
            val_59 = val_32 + val_59;
            goto label_74;
            label_72:
            float val_60 = 0.5f;
            val_60 = val_32 + val_60;
            label_74:
            var val_34 = (val_28 < 0) ? ((int)val_28) : ((int)val_28);
            val_34 = val_34 & 255;
            var val_35 = (val_30 < 0) ? ((int)val_30) : ((int)val_30);
            val_35 = val_35 & 255;
            var val_36 = (val_60 < 0) ? ((int)val_60) : ((int)val_60);
            this.startColor = (S14 < 0) ? ((int)S14) : ((int)S14);
            if(this.existsMaterial != false)
            {
                    if(mem[536891409] == 0)
            {
                    val_95 = this.startColor;
            }
            
                float val_64 = 255f;
                float val_61 = (float)val_95 & 255;
                float val_62 = (float)(uint)(val_95 >> 8) & 255;
                val_95 = val_95 >> 24;
                float val_63 = (float)(uint)(val_95 >> 16) & 255;
                val_61 = val_61 / val_64;
                val_62 = val_62 / val_64;
                val_63 = val_63 / val_64;
                val_64 = (float)val_95 / val_64;
                this.Material.SetColor(nameID:  mem[536891369], value:  new UnityEngine.Color() {r = val_61, g = val_62, b = val_63, a = val_64});
                return;
            }
            
            this.currentRenderer = this.GetComponent<System.Object>();
            UnityEngine.Color32 val_65 = this.startColor;
            float val_69 = 255f;
            float val_66 = (float)val_65 & 255;
            float val_67 = (float)(uint)(val_65 >> 8) & 255;
            val_65 = val_65 >> 24;
            float val_68 = (float)(uint)(val_65 >> 16) & 255;
            val_66 = val_66 / val_69;
            val_67 = val_67 / val_69;
            val_68 = val_68 / val_69;
            val_69 = (float)val_65 / val_69;
            this.currentRenderer.material.color = new UnityEngine.Color() {r = val_66, g = val_67, b = val_68, a = val_69};
        }
        private void Update()
        {
            var val_5;
            UnityEngine.Material val_60;
            float val_63;
            long val_64;
            float val_65;
            var val_66;
            long val_67;
            float val_68;
            var val_69;
            long val_71;
            float val_72;
            var val_73;
            var val_75;
            float val_76;
            long val_77;
            float val_78;
            var val_79;
            long val_80;
            float val_81;
            var val_82;
            float val_84;
            long val_85;
            float val_86;
            float val_88;
            float val_89;
            float val_90;
            float val_91;
            float val_92;
            long val_93;
            float val_94;
            var val_95;
            long val_96;
            float val_97;
            var val_98;
            long val_99;
            float val_100;
            var val_101;
            long val_103;
            float val_104;
            var val_105;
            if(this.UseInterval == false)
            {
                    return;
            }
            
            float val_1 = UnityEngine.Time.deltaTime;
            val_1 = this.elapsedTime + val_1;
            this.elapsedTime = val_1;
            if(val_1 <= this.changeTime)
            {
                goto label_2;
            }
            
            this.elapsedTime = 0f;
            this.lerpProgress = 0f;
            if(this.GrayScale == false)
            {
                goto label_3;
            }
            
            float val_3 = UnityEngine.Random.Range(minInclusive:  this.AlphaRange, maxInclusive:  this.changeTime);
            val_63 = val_3;
            val_3 = val_3 * 255f;
            float val_4 = ((UnityEngine.Random.Range(minInclusive:  this.HueRange, maxInclusive:  this.changeTime)) >= 0) ? (val_3) : 0f;
            if(val_4 >= 0f)
            {
                goto label_4;
            }
            
            if((double)val_4 != (-0.5))
            {
                goto label_5;
            }
            
            val_64 = (long)val_5;
            val_65 = (float)val_5;
            val_66 = val_65 + (-1f);
            goto label_6;
            label_3:
            UnityEngine.Vector2 val_59 = this.AlphaRange;
            UnityEngine.Color val_6 = UnityEngine.Random.ColorHSV(hueMin:  this.HueRange, hueMax:  this.changeTime, saturationMin:  this.SaturationRange, saturationMax:  null, valueMin:  this.ValueRange, valueMax:  null, alphaMin:  val_59, alphaMax:  null);
            float val_46 = 255f;
            val_46 = val_6.g * val_46;
            float val_7 = (val_6.r >= 0) ? (val_46) : 0f;
            val_63 = val_6.a;
            if(val_7 >= 0f)
            {
                goto label_7;
            }
            
            if((double)val_7 != (-0.5))
            {
                goto label_8;
            }
            
            val_67 = (long)val_5;
            val_68 = (float)val_5;
            val_69 = val_68 + (-1f);
            goto label_9;
            label_4:
            if((double)val_4 != 0.5)
            {
                goto label_10;
            }
            
            val_64 = (long)val_5;
            val_65 = (float)val_5;
            val_66 = val_65 + 1f;
            label_6:
            var val_8 = ((val_64 & 1) != 0) ? (val_65) : (val_66);
            goto label_14;
            label_7:
            if((double)val_7 != 0.5)
            {
                goto label_12;
            }
            
            val_67 = (long)val_5;
            val_68 = (float)val_5;
            val_69 = val_68 + 1f;
            label_9:
            var val_9 = ((val_67 & 1) != 0) ? (val_68) : (val_69);
            goto label_26;
            label_5:
            float val_47 = -0.5f;
            val_47 = val_4 + val_47;
            goto label_14;
            label_10:
            float val_48 = 0.5f;
            val_48 = val_4 + val_48;
            label_14:
            if(val_4 >= 0f)
            {
                goto label_15;
            }
            
            if((double)val_4 != (-0.5))
            {
                goto label_16;
            }
            
            val_71 = (long)val_5;
            val_72 = (float)val_5;
            val_73 = val_72 + (-1f);
            goto label_17;
            label_15:
            if((double)val_4 != 0.5)
            {
                goto label_18;
            }
            
            val_71 = (long)val_5;
            val_72 = (float)val_5;
            val_73 = val_72 + 1f;
            label_17:
            var val_10 = ((val_71 & 1) != 0) ? (val_72) : (val_73);
            goto label_20;
            label_16:
            float val_49 = -0.5f;
            val_49 = val_4 + val_49;
            goto label_20;
            label_18:
            float val_50 = 0.5f;
            val_50 = val_4 + val_50;
            label_20:
            if(val_4 >= 0f)
            {
                goto label_21;
            }
            
            if((double)val_4 == (-0.5))
            {
                goto label_22;
            }
            
            val_75 = val_4 + (-0.5f);
            goto label_38;
            label_21:
            if((double)val_4 == 0.5)
            {
                goto label_24;
            }
            
            val_76 = val_4 + 0.5f;
            goto label_25;
            label_8:
            float val_51 = -0.5f;
            val_51 = val_7 + val_51;
            goto label_26;
            label_12:
            float val_52 = 0.5f;
            val_52 = val_7 + val_52;
            label_26:
            val_52 = val_52 * 255f;
            float val_11 = (val_6.g >= 0) ? (val_52) : 0f;
            if(val_11 >= 0f)
            {
                goto label_27;
            }
            
            if((double)val_11 != (-0.5))
            {
                goto label_28;
            }
            
            val_77 = (long)val_5;
            val_78 = (float)val_5;
            val_79 = val_78 + (-1f);
            goto label_29;
            label_27:
            if((double)val_11 != 0.5)
            {
                goto label_30;
            }
            
            val_77 = (long)val_5;
            val_78 = (float)val_5;
            val_79 = val_78 + 1f;
            label_29:
            var val_12 = ((val_77 & 1) != 0) ? (val_78) : (val_79);
            goto label_32;
            label_28:
            float val_53 = -0.5f;
            val_53 = val_11 + val_53;
            goto label_32;
            label_30:
            float val_54 = 0.5f;
            val_54 = val_11 + val_54;
            label_32:
            val_54 = val_54 * 255f;
            float val_13 = (val_6.b >= 0) ? (val_54) : 0f;
            if(val_13 >= 0f)
            {
                goto label_33;
            }
            
            if((double)val_13 != (-0.5))
            {
                goto label_34;
            }
            
            label_22:
            val_80 = (long)val_5;
            val_81 = (float)val_5;
            val_82 = val_81 + (-1f);
            goto label_35;
            label_33:
            if((double)val_13 != 0.5)
            {
                goto label_36;
            }
            
            label_24:
            val_80 = (long)val_5;
            val_81 = (float)val_5;
            val_82 = val_81 + 1f;
            label_35:
            var val_14 = ((val_80 & 1) != 0) ? (val_81) : (val_82);
            goto label_38;
            label_34:
            val_75 = val_13 + (-0.5f);
            goto label_38;
            label_36:
            val_76 = val_13 + 0.5f;
            label_25:
            label_38:
            val_76 = val_76 * 255f;
            val_84 = 0f;
            float val_15 = (val_63 >= 0) ? (val_76) : (val_84);
            if(val_15 >= 0f)
            {
                goto label_39;
            }
            
            if((double)val_15 != (-0.5))
            {
                goto label_40;
            }
            
            val_85 = (long)val_5;
            val_86 = (float)val_5;
            val_84 = val_86 + (-1f);
            goto label_41;
            label_39:
            if((double)val_15 != 0.5)
            {
                goto label_42;
            }
            
            val_85 = (long)val_5;
            val_86 = (float)val_5;
            val_84 = val_86 + 1f;
            label_41:
            val_86 = ((val_85 & 1) != 0) ? (val_86) : (val_84);
            goto label_44;
            label_40:
            float val_55 = -0.5f;
            val_55 = val_15 + val_55;
            goto label_44;
            label_42:
            float val_56 = 0.5f;
            val_56 = val_15 + val_56;
            label_44:
            var val_17 = (val_11 < 0) ? ((int)val_11) : ((int)val_11);
            val_17 = val_17 & 255;
            var val_18 = (val_13 < 0) ? ((int)val_13) : ((int)val_13);
            val_18 = val_18 & 255;
            var val_19 = (val_56 < 0) ? ((int)val_56) : ((int)val_56);
            this.endColor = (S14 < 0) ? ((int)S14) : ((int)S14);
            this.changeTime = UnityEngine.Random.Range(minInclusive:  this.ChangeInterval, maxInclusive:  val_84);
            label_2:
            if(this.existsMaterial != false)
            {
                    val_60 = this.Material;
                float val_21 = (this.lerpProgress >= 0) ? (val_84) : 0f;
                UnityEngine.Color32 val_57 = this.startColor;
                UnityEngine.Color32 val_58 = this.endColor;
                float val_60 = (float)val_57 & 255;
                val_57 = val_57 >> 24;
                float val_61 = (float)val_57;
                val_58 = val_58 >> 24;
                float val_62 = (float)val_58 & 255;
                val_59 = val_59 & 1095216660735;
                float val_63 = (float)val_58;
                val_60 = val_60 / 255f;
                val_61 = val_61 / 255f;
                val_62 = val_62 / 255f;
                val_63 = val_63 / 255f;
                double val_64 = (double)val_59;
                val_64 = val_64 / val_6.a;
                val_6.a = 1026497183744 / val_6.a;
                float val_24 = val_62 - val_60;
                val_63 = val_63 - val_61;
                val_6.a = val_6.a - val_64;
                val_24 = val_24 * val_21;
                val_63 = val_21 * val_63;
                val_88 = val_64 + val_21;
                val_89 = val_60 + val_24;
                val_90 = val_61 + val_63;
                val_91 = val_88;
                val_60.SetColor(nameID:  mem[536891369], value:  new UnityEngine.Color() {r = val_89, g = val_88, b = val_91, a = val_90});
            }
            else
            {
                    float val_26 = (this.lerpProgress >= 0) ? (val_84) : 0f;
                UnityEngine.Color32 val_65 = this.startColor;
                UnityEngine.Color32 val_66 = this.endColor;
                val_65 = val_65 >> 24;
                float val_67 = (float)val_65 & 255;
                val_66 = val_66 >> 24;
                float val_68 = (float)val_65;
                float val_69 = (float)val_66 & 255;
                float val_70 = (float)val_66;
                val_67 = val_67 / 255f;
                val_68 = val_68 / 255f;
                val_69 = val_69 / 255f;
                val_70 = val_70 / 255f;
                double val_71 = (double)V5.8B & 1095216660735;
                val_71 = val_71 / val_6.a;
                val_6.a = 1026497183744 / val_6.a;
                float val_30 = val_69 - val_67;
                val_70 = val_70 - val_68;
                val_6.a = val_6.a - val_71;
                val_30 = val_30 * val_26;
                val_70 = val_26 * val_70;
                val_88 = val_71 + val_26;
                val_89 = val_67 + val_30;
                val_90 = val_68 + val_70;
                val_91 = val_88;
                this.currentRenderer.material.color = new UnityEngine.Color() {r = val_89, g = val_88, b = val_91, a = val_90};
            }
            
            val_92 = this.lerpProgress;
            if(val_92 < 0)
            {
                    float val_31 = UnityEngine.Time.deltaTime;
                float val_72 = this.changeTime;
                val_72 = val_72 + (-0.1f);
                val_31 = val_31 / val_72;
                val_31 = val_92 + val_31;
                this.lerpProgress = val_31;
                return;
            }
            
            if(this.existsMaterial != false)
            {
                    val_60 = this.Material;
                UnityEngine.Color val_32 = val_60.GetColor(nameID:  mem[536891369]);
            }
            else
            {
                    UnityEngine.Color val_34 = this.currentRenderer.material.color;
            }
            
            float val_73 = 255f;
            val_73 = val_34.g * val_73;
            float val_35 = (val_34.r >= 0) ? (val_73) : 0f;
            if(val_35 >= 0f)
            {
                goto label_59;
            }
            
            if((double)val_35 != (-0.5))
            {
                goto label_60;
            }
            
            val_93 = (long)val_5;
            val_94 = (float)val_5;
            val_95 = val_94 + (-1f);
            goto label_61;
            label_59:
            if((double)val_35 != 0.5)
            {
                goto label_62;
            }
            
            val_93 = (long)val_5;
            val_94 = (float)val_5;
            val_95 = val_94 + 1f;
            label_61:
            var val_36 = ((val_93 & 1) != 0) ? (val_94) : (val_95);
            goto label_64;
            label_60:
            float val_74 = -0.5f;
            val_74 = val_35 + val_74;
            goto label_64;
            label_62:
            float val_75 = 0.5f;
            val_75 = val_35 + val_75;
            label_64:
            val_75 = val_75 * 255f;
            float val_37 = (val_34.g >= 0) ? (val_75) : 0f;
            if(val_37 >= 0f)
            {
                goto label_65;
            }
            
            if((double)val_37 != (-0.5))
            {
                goto label_66;
            }
            
            val_96 = (long)val_5;
            val_97 = (float)val_5;
            val_98 = val_97 + (-1f);
            goto label_67;
            label_65:
            if((double)val_37 != 0.5)
            {
                goto label_68;
            }
            
            val_96 = (long)val_5;
            val_97 = (float)val_5;
            val_98 = val_97 + 1f;
            label_67:
            var val_38 = ((val_96 & 1) != 0) ? (val_97) : (val_98);
            goto label_70;
            label_66:
            float val_76 = -0.5f;
            val_76 = val_37 + val_76;
            goto label_70;
            label_68:
            float val_77 = 0.5f;
            val_77 = val_37 + val_77;
            label_70:
            val_77 = val_77 * 255f;
            float val_39 = (val_34.b >= 0) ? (val_77) : 0f;
            if(val_39 >= 0f)
            {
                goto label_71;
            }
            
            if((double)val_39 != (-0.5))
            {
                goto label_72;
            }
            
            val_99 = (long)val_5;
            val_100 = (float)val_5;
            val_101 = val_100 + (-1f);
            goto label_73;
            label_71:
            if((double)val_39 != 0.5)
            {
                goto label_74;
            }
            
            val_99 = (long)val_5;
            val_100 = (float)val_5;
            val_101 = val_100 + 1f;
            label_73:
            var val_40 = ((val_99 & 1) != 0) ? (val_100) : (val_101);
            goto label_76;
            label_72:
            float val_78 = -0.5f;
            val_78 = val_39 + val_78;
            goto label_76;
            label_74:
            float val_79 = 0.5f;
            val_79 = val_39 + val_79;
            label_76:
            val_79 = val_79 * 255f;
            float val_41 = (val_34.a >= 0) ? (val_79) : 0f;
            if(val_41 >= 0f)
            {
                goto label_77;
            }
            
            if((double)val_41 != (-0.5))
            {
                goto label_78;
            }
            
            val_103 = (long)val_5;
            val_104 = (float)val_5;
            val_105 = val_104 + (-1f);
            goto label_79;
            label_77:
            if((double)val_41 != 0.5)
            {
                goto label_80;
            }
            
            val_103 = (long)val_5;
            val_104 = (float)val_5;
            val_105 = val_104 + 1f;
            label_79:
            val_104 = ((val_103 & 1) != 0) ? (val_104) : (val_105);
            goto label_82;
            label_78:
            float val_80 = -0.5f;
            val_80 = val_41 + val_80;
            goto label_82;
            label_80:
            float val_81 = 0.5f;
            val_81 = val_41 + val_81;
            label_82:
            var val_42 = (val_37 < 0) ? ((int)val_37) : ((int)val_37);
            val_42 = val_42 & 255;
            var val_44 = (val_39 < 0) ? ((int)val_39) : ((int)val_39);
            val_44 = val_44 & 255;
            var val_45 = (val_81 < 0) ? ((int)val_81) : ((int)val_81);
            this.startColor = (S14 < 0) ? ((int)S14) : ((int)S14);
        }
        public RandomColor()
        {
            this.UseInterval = true;
            this.SaturationRange = 1;
            this.ChangeInterval = ;
            this.AlphaRange = 4575657222473777152;
        }
        private static RandomColor()
        {
            mem2[0] = UnityEngine.Shader.PropertyToID(name:  -1610600853);
        }
    
    }

}
